<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>传递自定义参数，事件修饰符</title>
</head>
<body>
    <div id="app">
        <input type="button" value="点击" @click="doIt('你好',123)">
        <input type="text" @keyup.enter="sayHi(this.valueOf())">
    </div>
    <script src="https://cdn.jsdelivr.net/npm/vue"></script>
    <script>
        let app = new Vue({
            el:"#app",
            methods:{
                doIt:function (str,num) {
                    alert(str + num);
                },
                sayHi:function (p) {
                    alert(p);
                }
            }
        })
    </script>
</body>
</html>